<?php

namespace addons\shopro\validate\lucky;

use think\Validate;

class Server extends Validate
{
    protected $rule = [
        'number' => 'require|integer',
        'rep_password' => 'require|alphaDash',
        'server_id' => 'require|integer',
        'funds' => 'require|integer|between:30:100',
        'recharge_money' => 'require|integer',
        'images' => 'require',
        'remittance_id' => 'require|integer',
    ];

    protected $message  =   [
        'number.require'     => '请填写数量',
        'rep_password.require'     => '请填写支付密码',
        'server_id.require'     => '请选择活动',

        'number.integer'     => '数量输入错误',
        'rep_password.alphaDash'     => '密码格式不正确，字母和数字，下划线_及破折号-',
        'server_id.integer'     => '活动选择错误',

        'recharge_money.require'     => '请填写数量',
        'images.require'     => '请上传支付凭证',
        'remittance_id.require'     => '请选择活动',

        'recharge_money.integer'     => '数量输入错误',
        'remittance_id.integer'     => '通道选择错误',


    ];

    protected $scene = [
        'server'  =>  ['number', 'rep_password','server_id'],
        'payrecord'  =>  ['recharge_money', 'images','remittance_id'],
        'auto'  => ['rep_password']

    ];

}